package Extends.homeworkYuanZhu.com07;

import java.util.*;

public class City {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        HashMap<String, ArrayList<String>> city = new HashMap<>();
        ArrayList<String> listHa = new ArrayList<>();
        System.out.println("当前可前往城市");
        System.out.println("吉林  黑龙江  河北  重庆  上海  北京");
        listHa.add("长春  吉林  四平  辽源  通化  白山  松原 ");
        city.put("吉林", listHa);
        ArrayList<String> listBei = new ArrayList<>();
        listBei.add("北京  天津  河北  山西  内蒙古  辽宁  吉林 ");
        city.put("北京", listBei);
        System.out.println("输入市名：");
        String province = sc.nextLine();
        System.out.println(city.get(province));
        System.out.println("请输入要前往的城市：");
        //..................................................................................
        String cityName = sc.nextLine();
        System.out.println("请确认信息是否正确");
        System.out.println("前往城市："+province+"                目的地："+cityName);
        String confirm = sc.nextLine();
            if (confirm.equals("是")) {
                System.out.println("登记完毕，谢谢配合");
            } else if (confirm.equals("否")) {
                System.out.println("请重新输入");
                System.out.println("输入市名：");
                String province01 = sc.nextLine();
                System.out.println(city.get(province01));
                System.out.println("请输入要前往的城市：");
                String cityName01 = sc.nextLine();
                System.out.println("请确认信息是否正确");
                System.out.println("前往城市：" + province01 + "                目的地：" + cityName01);
            }
        }


////        city.put("吉林", new String[]{"", "", "", "", "", "", ""});
//        city.put("黑龙江", list.{"哈尔滨", "大庆", "绥化", "", ", "绥化", "黑龙"});
//        city.put("上海", new String[]{"上海", "", "", "", "", "福建", "广东"});
//        city.put("河北", new String[]{"石家庄", "唐山", "秦皇岛", "邯郸", "邢台", "保定", "张家口"});
//        city.put("重庆",new String[]{"重庆", "四川", "云南", "贵州", "西藏", "陕西", "甘肃"});
//        city.put("北京",new String[]{"北京", "天津", "河北", "山西", "内蒙古", "辽宁", "吉林"});
//        System.out.println(city.get("重庆"));

    }
}
